<template>
  <div class="search">
    <van-nav-bar title="搜索" left-text="返回" left-arrow @click-left="onClickLeft" />
    <form action="/">
    <van-search v-model="value" show-action placeholder="商品搜索" @cancel="onCancel" />
    </form>
  </div>
</template>

<script>
import { indexaction } from "@/api/home/search";
export default {
  data() {
    return {
      searchInfo: "",
      value: "",
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    onCancel() {
      this.$router.go(-1);
    },
  },
  created() {
    indexaction().then((res) => {
      console.log(res);
      this.searchInfo = res;
    });
  },
};
</script>

<style lang="scss" scoped>
</style>